home *** CD-ROM | disk | FTP | other *** search
/ Guide To Cracking 2002 / Guide_to_Cracking_2002.iso / Tutorials / Nag and Time Trial / nag / ns36.txt < prev    next >
Encoding:
Text File  |  2000-04-18  |  6.5 KB  |  139 lines

  1.  
  2.  Target: Firehand Lightning 2.1.3
  3.  Tools: SICE Symbol Loader, W32Dasm, Hex-Editor
  4.  Level: 2 (2 only because of the crashes!)
  5.  Protection: Nag/Timeout + some evaluation/unregistered texts :)
  6.  Crack type: Patch
  7.  URL: www.firehand.com
  8.  
  9.  
  10.  Background:
  11.  
  12.  I only picked this program coz its name was very c00l :) guess its some sorta picture viewer..
  13.  Since there's no enter name/serial boxes where to enter our regcode, we shall simply patch
  14.  the program to think its registered.. i dunno then if it really is coz i'm an incredibly
  15.  lazy tester.. (well.. u at #c4n know I'm a lazy bastard, so not lazy tester but Lazy Bastard)
  16.  
  17.  Let's kick asz (make sure you made the backups!!! i woulda been lost without them)
  18.  
  19.  when you launch the program you see the annoying nag popping up.. blah, lets get rid of it
  20.  BPX DialogBoxParamA and relaunch the program, *BREAK*.. lets see.. SICE is at 4210D4, lets use
  21.  w32dasm to get a better picture (BD* and exit SICE)
  22.  
  23.  :004210D3 57                      push edi
  24.  
  25.  * Reference To: USER32.DialogBoxParamA, Ord:0093h
  26.                                   |
  27.  :004210D4 FF1588724400            Call dword ptr [00447288] <-- call the nag
  28.  
  29.  mmm.. a simple thing, nop it out (5 x 90h).. ok launch the program again..
  30.  wtf? gpf? the program crashed.. oh damned.. *sigh*.. i hate these ones..
  31.  
  32.  restore the original .exe.. and lets go to symbol loader
  33.  
  34.  ok, here's where symbol loader comes useful, open the .exe and translate it,
  35.  when in SICE, press f10 to get into main program and type G 4210D4
  36.  
  37.  you're in the above place.. now execute the call (step over it -> F10)..
  38.  now look at the values in registers.. write them down or something and patch
  39.  the nag again, reopen the .exe with symbol loader and translate again..
  40.  goto 4210D4 again.. look at the registers again, do they differ? Yup
  41.  
  42.  I remember a person once telling me on IRC that only thing you have to watch
  43.  is that esp is restored correctly.. and thats exactly what we have to do
  44.  (if you let esp remain as it is in the patched .exe the program will crash
  45.   coz it'll return from the call to a wrong place..)
  46.  
  47.  Do a following patch :
  48.  
  49.  FF1588724400 (the nag caller after DialogBoxParamA)
  50.  
  51.  change it to (might differ on your comp):
  52.  
  53.  BC64EE6A00 (this one restores ESP like it has to be after the nag is displayed..)
  54.  and 40 (inc eax to be 1) , so it'll look like BC64EE6A0040
  55.  
  56.  Notice that BC64EE6A00 might differ on your comp depending on the correct ESP value.
  57.  trace with symbol loader over the call (with the original .exe) and see ESP value
  58.  after it, and modify the opcode to suit your comp
  59.  
  60.  save and exit and execute the program, does it crash anymore? nah.. right thing we did :)
  61.  
  62.  now at the point i had re-run the program so many times (over 30) that I could see 
  63.  the evaluation period has expired. Please register -text.. we dun wanna see it, do we?
  64.  nope.. haha.. here comes the best part ;))
  65.  
  66.  Yeah well.. i was lazy and because i should already be sleeping coz i gotta wake up early
  67.  tomorrow morning i decided not to hunt for the timeout compare and decided to go for funny way 
  68.  
  69.  Evaluation period has expired. Please register! ..  i open the .exe with Hiew and search
  70.  for the string (Evaluation). The first string I come to seems to be the right one, I edit it
  71.  a bit and save and exit.. yah! looks nice ;) enter whatever u want but dont enter more chars
  72.  than there originally are!
  73.  
  74.  now for the last parts, the stupid evaluation text.. and unregistered text in about box
  75.  
  76.  take the about box unregistered first.. search for unregistered in w32dasm and come across this one:
  77.  
  78.  :0040136D FFD5                    call ebp
  79.  :0040136F 8B8424CC020000          mov eax, dword ptr [esp+000002CC]
  80.  :00401376 85C0                    test eax, eax              <-- you can only wonder..
  81.  :00401378 7408                    je 00401382                <-- lamers away
  82.  :0040137A 803800                  cmp byte ptr [eax], 00     <-- compare "you suck ass" or "you kick ass!"
  83.  :0040137D 7403                    je 00401382                <-- not regged, jump lamer
  84.  :0040137F 50                      push eax
  85.  :00401380 EB05                    jmp 00401387               <-- take this jump to "registered owner"
  86.  
  87.  * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  88.  |:00401378(C), :0040137D(C)
  89.  |
  90.  
  91.  * Possible StringData Ref from Data Obj ->"<Unregistered>"
  92.  
  93.  Thought i was gonna make it easy by patching the je's but not.. crashes crashes.. fackit ..
  94.  ok, looks like we gotta fix this one too, symbol loader helps a lot but i'll show you the 
  95.  short way
  96.  
  97.  i did like this
  98.  
  99.  :00401376 85C0                    test eax, eax
  100.  :00401378 7408                    je 00401382
  101.  :0040137A 803800                  cmp byte ptr [eax], 00
  102.  :0040137D 7403                    je 00401382
  103.  
  104.  changes to:
  105.  
  106.  :00401376 40                      inc eax
  107.  :00401377 90              nop
  108.  :00401378 7408                    je 00401382
  109.  :0040137A 90                      nop
  110.  :0040137B 90              nop
  111.  :0040137C 90                      nop
  112.  :0040137D 7403                    je 00401382
  113.  
  114.  eax is set for "passed flag" and comparing (that btw crashes this procedure) is nopped out..
  115.  look at about box now, what do you see? REGISTEREDOWNER.. looks nice :)
  116.  
  117.  now the last thing .. you see evaluation edition text in the top of the window? yup, easy done
  118.  just search for it in Hiew eg. and replace it with the text of your choice :)
  119.  
  120.  Final notes:
  121.  
  122.  I think I never patched a program as much as I did now.. but it looks like it works. I'm a Lazy Bastard  nevertheless so don't count on it :) also i never dealt with crashing problems before
  123.  but i'm glad i could overcome them in this tute, i was little surprised myself that I got this
  124.  thing to work.
  125.  
  126.  -C_DKnight
  127.  
  128.  reach me at c_dknight@iobox.com
  129.  
  130.  Greetings: (this part seems to be growing every tute and i'm sure there are still ppl left to be added)
  131.  
  132.  AB4DS, r!SC, Dead-Mike, NrOC, Warezpup, Hutch, [yAtEs], [E_BLiss], [LaZaRuS], Doufas, SeKt0r, nchanta,
  133.  Icecream, |Xmen|, LordOfLA, F0dder, Predator, aCiDHaC, ACiD BuRN, X-Calibre, DnNuke, noos, nu, Thesmurf,
  134.  defiler, Sinn0r, ^tCM^, Norika, cTT, Weazel, MisterE, Dawai, RevX, Maybird, BlackBird, FireWorx, N|Te, 
  135.  SheeP14o, extasy_, KaOsAuS, _zoltan, Torn@do, ByteBurn, Miscreant, croc, Br4t, [ViKiNg], Phrekie,
  136.  =Metal=, B|aze, Moredhel, Seffren, Dafoe, Speedsta, Rad|cal, [Daze], VisionZ, KaKTuZ, Stilgreen, 
  137.  Kwazy Wabbit plus all my friends at #cdrinfo, #cracking4newbies and other chans..
  138.  
  139.